#ifndef STACK_LINK_H__
#define STACK_LINK_H__

typedef int Datatype;

typedef struct stack_link_st
{
	Datatype data;
	struct stack_link_st *prev;
	struct stack_link_st *next;
}stack_st;

typedef struct link_head
{
	stack_st *first;
	stack_st *top;
	int number;
}link_head;

//初始化栈
int Init_Stack(link_head **);

//销毁栈
void Destroy_Stack(link_head *);

//栈清空
void Clear_Stack(link_head *);

//判断栈是否为空
int IsEmpty_Stack(link_head *);

//栈的长度
int Length_Stack(link_head *);

//出栈
int Pop_Stack(link_head *,Datatype *);

//入栈
int Push_Stack(link_head *,Datatype);

//获得栈顶元素
int GetTop_Stack(link_head *,Datatype *);

#endif
